package com.asw.springboot.common.Adapter;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * Created by hxq on 2017/5/17.
 * 处理静态资源（自定义资源映射） 资源管理器
 */
@Configuration
public class MyWebAppConfigurer extends WebMvcConfigurerAdapter {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/web/**","/assets/**").
                addResourceLocations("classpath:/web/","classpath:/assets/");
        super.addResourceHandlers(registry);
    }


}
